package com.huangmb.anymark.app.utils;

import android.graphics.Bitmap;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.support.annotation.DrawableRes;
import android.support.v4.graphics.drawable.DrawableCompat;
import com.huangmb.androidlib.utils.ImageUtils;

/**
 * @author hmb
 * @version 1.0
 * @since 2016/4/27 13:30
 */
public class DrawableUtils {
    public static Bitmap getTintedBitmap(Drawable drawable, int color){
        drawable.setColorFilter(color, PorterDuff.Mode.SRC_IN);
        return ImageUtils.drawableToBitmap(drawable);
    }
}
